home *** CD-ROM | disk | FTP | other *** search
- Timer1 is a simple timer program written in C. The routines are for
- Lattice C but can easily be modified to work with any PC-DOS C compiler.
-
- The routines are handy for when you wish to time the execution of a program.
- The function starttm sets the start time in a global variable, and the
- function stoptm returns the difference between the stop time and start
- time in seconds. The routines can be easily modified to return hours,
- minutes, or hundredths of seconds. Notice that the functions do not check
- to see if a new day begins during execution (only a problem if you're up
- after midnight), and the stoptm function returns an integer instead of
- a long integer.
-
- The functions can also be used for executing a wait command. Simply
- excute starttm(), then have a while loop which checks the value of
- stoptm() until it is greater than or equal to the required wait time.
-
- Feel free to modify these routines as desired.
-
- The program timer1.exe is a simple example of the use of these routines.
-
-
-
-